package com.example.rbac.uitls;

import com.example.rbac.entity.User;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * Created by Administrator on 2017/10/19.
                */
        public  class UserUtils {
            public static User getUser(){
                User user = (User) SecurityUtils.getSubject().getPrincipal();
                return user;
    }
}
